<template>
  <div class="common-head">
    <van-nav-bar
      :title="title"
      left-arrow
      :right-text="delText"
      @click-right="clickRight"
      @click-left="$router.go(-1)"
    />
  </div>
</template>

<script>
export default {
  props: {
    title: {
      type: String,
      required: true
    },
    delText: {
      type: String,
      default: '管理'
    }
  },
  methods: {
    clickRight () {
      this.$emit('clickDel')
    }
  }
}
</script>

<style lang="scss" scoped>
.common-head{
  height: 46px;
  position: fixed;
  width: 100%;
  left: 0;
  top: 0;
  z-index: 100;
  /deep/  .van-nav-bar{
    background-color: #ff734c;
    .van-nav-bar__title{
      color:#fff;
    }
    .van-icon{
      color: #fff;
      font-size: 22px;
    }
    .van-nav-bar__text{
      color: #fff;
    }
  }
}
</style>
